package dsl.test

show = { println it }
//show "help"

square_root = { Math.sqrt(it) }

static def please(action) {
	[
			the : { what -> [ of : { n -> action(what(n)) }]
			}
	]
}

//please返回值 是一个map
please(show)

//返回map.the的值，是一个闭包 action是show
please(show).the

//调用闭包，并传入square_root 返回另一map 即what的值 此时的what为闭包square_root
please(show).the(square_root)

//取另一map的of的值 此时action 是show  what 是square_root 即 of -> {n -> show(square_root(n)}
please(show).the(square_root).of

please show the square_root of 100

please(show).the(square_root).of(100)